/*
 * DeCompressZip.h
 *
 *  Created on: 2009-1-22
 *      Author: hequn
 */

#ifndef DECOMPRESSZIP_H_
#define DECOMPRESSZIP_H_

//#include <e32base.h>
#include <EZGzip.h>
#include <zipfile.h>


class CDeCompressZip : public CActive//CBase
{
public:
	
	~CDeCompressZip();
	
	CDeCompressZip();
	/*
	 * NewL() NewLC()  ConstructL();
	 */
	static CDeCompressZip* NewL();//const TDesC& aZipfile
	
	static CDeCompressZip* NewLC();//const TDesC& aZipfile
	
	void ConstructL();//const TDesC& aZipfile
	
	void WriteFileToSave(const TDesC& afilenZipame, const TDesC& aPath, TBool aRemoveSource = EFalse);
	
	void WriteFileCyclingL(CZipFileMember* pMember);
	
	
private:	

	//CPeriodic* m_Periodic;
	//static TInt WriteCallback(TAny* pInst);
	void RunL();
	void DoCancel();	
	
	void FinishedWriteAndDestroyObj();
	
	//Data
	RFs iFs;	
	CZipFile* m_pZipfile;	//Zip file!
	CZipFileMemberIterator* m_pFilesOfZip;
	
	HBufC* m_pDirectPath;
	TBool 	m_isRemoveSourceFile;//是否删除源压缩包标记
	TFileName 	m_sourceFile;
	
	RTimer iTimer;
};

#endif /* DECOMPRESSZIP_H_ */
